from selenium import webdriver
from time import sleep
import os
from selenium.webdriver.common.by import By

'''
串联查找
'''
driver = webdriver.Firefox()
html_file = os.getcwd() + os.sep + 'myhtml5_2.html'
driver.get(html_file)
mytext = driver.find_element(By.ID, "B").find_element(By.TAG_NAME, "div").text
print(mytext)
driver.quit()
